<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE MagicHash #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE NegativeLiterals #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE MultiWayIf #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE BinaryLiterals #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Num.Backend.Native</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;MachDeps.h&quot;
</span><span class="hs-cpp">#include &quot;WordSize.h&quot;
</span><span class="hs-cpp">
#if defined(BIGNUM_NATIVE) || defined(BIGNUM_CHECK) || defined(BIGNUM_FFI)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-identifier">GHC.Num.BigNat</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-identifier">GHC.Num.Natural</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-identifier">GHC.Num.Integer</span><span class="hs-cpp">
#else
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html"><span class="hs-identifier">GHC.Num.BigNat</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html"><span class="hs-identifier">GHC.Num.Natural</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html"><span class="hs-identifier">GHC.Num.Integer</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html"><span class="hs-identifier">GHC.Num.WordArray</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html"><span class="hs-identifier">GHC.Num.Primitives</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">default</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#count_words_bits"><span class="hs-identifier hs-type">count_words_bits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-34"></span><span id="count_words_bits"><span class="annot"><span class="annottext">count_words_bits :: Word# -&gt; (# Word#, Word# #)
</span><a href="GHC.Num.Backend.Native.html#count_words_bits"><span class="hs-identifier hs-var hs-var">count_words_bits</span></a></span></span><span> </span><span id="local-6989586621679035737"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035737"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035736"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035735"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-35"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-36"></span><span>      </span><span id="local-6989586621679035736"><span class="annot"><span class="annottext">nw :: Word#
</span><a href="#local-6989586621679035736"><span class="hs-identifier hs-var hs-var">nw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035737"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_SHIFT#</span><span>
</span><span id="line-37"></span><span>      </span><span id="local-6989586621679035735"><span class="annot"><span class="annottext">nb :: Word#
</span><a href="#local-6989586621679035735"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035737"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_BITS_MASK##</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#count_words_bits_int"><span class="hs-identifier hs-type">count_words_bits_int</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-40"></span><span id="count_words_bits_int"><span class="annot"><span class="annottext">count_words_bits_int :: Word# -&gt; (# Int#, Int# #)
</span><a href="GHC.Num.Backend.Native.html#count_words_bits_int"><span class="hs-identifier hs-var hs-var">count_words_bits_int</span></a></span></span><span> </span><span id="local-6989586621679035733"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035733"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Word#, Word# #)
</span><a href="GHC.Num.Backend.Native.html#count_words_bits"><span class="hs-identifier hs-var">count_words_bits</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035733"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-41"></span><span>   </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035732"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035732"><span class="hs-identifier hs-var">nw</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035731"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035731"><span class="hs-identifier hs-var">nb</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035732"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035731"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_compare"><span class="hs-identifier hs-type">bignat_compare</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-44"></span><span id="bignat_compare"><span class="annot"><span class="annottext">bignat_compare :: WordArray# -&gt; WordArray# -&gt; Int#
</span><a href="GHC.Num.Backend.Native.html#bignat_compare"><span class="hs-identifier hs-var hs-var">bignat_compare</span></a></span></span><span> </span><span id="local-6989586621679035729"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035729"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035728"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035728"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="#local-6989586621679035727"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035726"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>      </span><span id="local-6989586621679035726"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035726"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035729"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-47"></span><span>      </span><span id="local-6989586621679035727"><span class="annot"><span class="annottext">go :: Int# -&gt; Int#
</span><a href="#local-6989586621679035727"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035724"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035724"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-48"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035724"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-49"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679035722"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035722"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035729"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035724"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-50"></span><span>         </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035721"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035721"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035728"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035724"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-51"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035722"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035721"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="#local-6989586621679035727"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035724"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035722"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#gtWord%23"><span class="hs-operator hs-var">`gtWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035721"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-53"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">-1#</span></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span id="local-6989586621679035767"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_add"><span class="hs-identifier hs-type">bignat_add</span></a></span><span>
</span><span id="line-56"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035767"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-57"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-58"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-59"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035767"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-60"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035767"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-61"></span><span id="bignat_add"><span class="annot"><span class="annottext">bignat_add :: forall s.
MutableWordArray# s
-&gt; WordArray# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_add"><span class="hs-identifier hs-var hs-var">bignat_add</span></a></span></span><span> </span><span id="local-6989586621679035719"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035718"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035718"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035717"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035717"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035716"><span class="hs-identifier hs-var">addABc</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-62"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-63"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035715"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035715"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035718"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-64"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035714"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679035714"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035717"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-65"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035713"><span class="annot"><span class="annottext">szMin :: Int#
</span><a href="#local-6989586621679035713"><span class="hs-identifier hs-var hs-var">szMin</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-var">minI#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035715"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035714"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span>      </span><span class="hs-comment">-- we have four cases:</span><span>
</span><span id="line-68"></span><span>      </span><span class="hs-comment">-- 1) we have a digit in A and in B + a potential carry</span><span>
</span><span id="line-69"></span><span>      </span><span class="hs-comment">--    =&gt; perform triple addition</span><span>
</span><span id="line-70"></span><span>      </span><span class="hs-comment">--    =&gt; result in (carry,word)</span><span>
</span><span id="line-71"></span><span>      </span><span class="hs-comment">-- 2) we have a digit only in A or B and a carry</span><span>
</span><span id="line-72"></span><span>      </span><span class="hs-comment">--    =&gt; perform double addition from a single array</span><span>
</span><span id="line-73"></span><span>      </span><span class="hs-comment">--    =&gt; result in (carry,word)</span><span>
</span><span id="line-74"></span><span>      </span><span class="hs-comment">-- 3) we have a digit only in A or B and no carry</span><span>
</span><span id="line-75"></span><span>      </span><span class="hs-comment">--    =&gt; perform array copy and shrink the array</span><span>
</span><span id="line-76"></span><span>      </span><span class="hs-comment">-- 4) We only have a potential carry</span><span>
</span><span id="line-77"></span><span>      </span><span class="hs-comment">--    =&gt; write the carry or shrink the array</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>      </span><span id="local-6989586621679035716"><span class="annot"><span class="annottext">addABc :: Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035716"><span class="hs-identifier hs-var hs-var">addABc</span></a></span></span><span> </span><span id="local-6989586621679035711"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035710"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035710"><span class="hs-identifier hs-var">carry</span></a></span></span><span> </span><span id="local-6989586621679035709"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035709"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-80"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035713"><span class="hs-identifier hs-var">szMin</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-81"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-82"></span><span>               </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035708"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035708"><span class="hs-identifier hs-var">carry'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035707"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035707"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="GHC.Num.Primitives.html#plusWord3%23"><span class="hs-identifier hs-var">plusWord3#</span></a></span><span>
</span><span id="line-83"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035718"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035717"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span>                                    </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035710"><span class="hs-identifier hs-var">carry</span></a></span><span>
</span><span id="line-86"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035707"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035709"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-87"></span><span>               </span><span id="local-6989586621679035704"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035704"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035716"><span class="hs-identifier hs-var">addABc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035708"><span class="hs-identifier hs-var">carry'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035704"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035715"><span class="hs-identifier hs-var">szA</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-var">&amp;&amp;#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035714"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteOrShrink"><span class="hs-identifier hs-var">mwaWriteOrShrink</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035710"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035709"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035715"><span class="hs-identifier hs-var">szA</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035701"><span class="hs-identifier hs-var">addAoBc</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035717"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035710"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035709"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-96"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035701"><span class="hs-identifier hs-var">addAoBc</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035718"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035711"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035710"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035709"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span>      </span><span id="local-6989586621679035701"><span class="annot"><span class="annottext">addAoBc :: WordArray# -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035701"><span class="hs-identifier hs-var hs-var">addAoBc</span></a></span></span><span> </span><span id="local-6989586621679035700"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035700"><span class="hs-identifier hs-var">wab</span></a></span></span><span> </span><span id="local-6989586621679035699"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035698"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035698"><span class="hs-identifier hs-var">carry</span></a></span></span><span> </span><span id="local-6989586621679035697"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035697"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-99"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035700"><span class="hs-identifier hs-var">wab</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteOrShrink"><span class="hs-identifier hs-var">mwaWriteOrShrink</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035698"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035697"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035698"><span class="hs-identifier hs-var">carry</span></a></span><span>
</span><span id="line-103"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-comment">-- copy the remaining words and remove the word allocated for the</span><span>
</span><span id="line-104"></span><span>           </span><span class="hs-comment">-- potential carry</span><span>
</span><span id="line-105"></span><span>           </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035700"><span class="hs-identifier hs-var">wab</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035700"><span class="hs-identifier hs-var">wab</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035697"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-106"></span><span>            </span><span id="local-6989586621679035695"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035695"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaShrink%23"><span class="hs-identifier hs-var">mwaShrink#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035695"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-109"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035693"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035693"><span class="hs-identifier hs-var">carry'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035692"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035692"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord2%23"><span class="hs-identifier hs-var">plusWord2#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035700"><span class="hs-identifier hs-var">wab</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035698"><span class="hs-identifier hs-var">carry</span></a></span><span>
</span><span id="line-110"></span><span>           </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035719"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035692"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035697"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-111"></span><span>               </span><span id="local-6989586621679035691"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035691"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035701"><span class="hs-identifier hs-var">addAoBc</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035700"><span class="hs-identifier hs-var">wab</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035699"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035693"><span class="hs-identifier hs-var">carry'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035691"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_add_word"><span class="hs-identifier hs-type">bignat_add_word</span></a></span><span>
</span><span id="line-114"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-115"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-116"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-117"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-118"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-119"></span><span id="bignat_add_word"><span class="annot"><span class="annottext">bignat_add_word :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_add_word"><span class="hs-identifier hs-var hs-var">bignat_add_word</span></a></span></span><span> </span><span id="local-6989586621679035689"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035689"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035688"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035688"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035687"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035687"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035686"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035686"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitArrayPlusWord"><span class="hs-identifier hs-var">mwaInitArrayPlusWord</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035689"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035688"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035687"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035686"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_sub_word"><span class="hs-identifier hs-type">bignat_sub_word</span></a></span><span>
</span><span id="line-122"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-123"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-124"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-125"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-126"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-127"></span><span id="bignat_sub_word"><span class="annot"><span class="annottext">bignat_sub_word :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Backend.Native.html#bignat_sub_word"><span class="hs-identifier hs-var hs-var">bignat_sub_word</span></a></span></span><span> </span><span id="local-6989586621679035682"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035682"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035681"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035681"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035680"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035680"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
</span><a href="#local-6989586621679035679"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035680"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-128"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-129"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035678"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035678"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035681"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-130"></span><span>      </span><span id="local-6989586621679035679"><span class="annot"><span class="annottext">go :: Word# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
</span><a href="#local-6989586621679035679"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035677"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035677"><span class="hs-identifier hs-var">carry</span></a></span></span><span> </span><span id="local-6989586621679035676"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035675"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035675"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-131"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035678"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035675"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035677"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035677"><span class="hs-identifier hs-var">carry</span></a></span><span>
</span><span id="line-135"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035682"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035681"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035678"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035675"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-136"></span><span>            </span><span id="local-6989586621679035674"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035674"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035674"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-comment">-- no underflow</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-139"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#subWordC%23"><span class="hs-identifier hs-var">subWordC#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035681"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035677"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-140"></span><span>            </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-141"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035678"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaShrink%23"><span class="hs-identifier hs-var">mwaShrink#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035682"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035675"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-142"></span><span>                                          </span><span id="local-6989586621679035673"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035673"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035673"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-comment">-- no underflow</span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035672"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035672"><span class="hs-identifier hs-var">l</span></a></span></span><span>  </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035671"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035671"><span class="hs-identifier hs-var">c</span></a></span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035682"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035672"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035675"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-145"></span><span>                              </span><span id="local-6989586621679035670"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035670"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
</span><a href="#local-6989586621679035679"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035671"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035676"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035670"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_mul_word"><span class="hs-identifier hs-type">bignat_mul_word</span></a></span><span>
</span><span id="line-148"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-149"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-150"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-151"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-152"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-153"></span><span id="bignat_mul_word"><span class="annot"><span class="annottext">bignat_mul_word :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_mul_word"><span class="hs-identifier hs-var hs-var">bignat_mul_word</span></a></span></span><span> </span><span id="local-6989586621679035668"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035668"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035667"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035667"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035666"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035666"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035665"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-154"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035664"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035664"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035667"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-156"></span><span>      </span><span id="local-6989586621679035665"><span class="annot"><span class="annottext">go :: Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035665"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035663"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035663"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035662"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035662"><span class="hs-identifier hs-var">carry</span></a></span></span><span> </span><span id="local-6989586621679035661"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035661"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-157"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035663"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035664"><span class="hs-identifier hs-var">szA</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteOrShrink"><span class="hs-identifier hs-var">mwaWriteOrShrink</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035668"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035662"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035663"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035661"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-158"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-159"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-160"></span><span>               </span><span id="local-6989586621679035660"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035660"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035667"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035663"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-161"></span><span>               </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035659"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035659"><span class="hs-identifier hs-var">carry'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035658"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035658"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Word#, Word# #) -&gt; (# Word#, Word# #)
</span><a href="GHC.Num.Primitives.html#plusWord12%23"><span class="hs-identifier hs-var">plusWord12#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035662"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord2%23"><span class="hs-identifier hs-var">timesWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035660"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035666"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035668"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035663"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035658"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035661"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-163"></span><span>                  </span><span id="local-6989586621679035656"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035656"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035665"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035663"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035659"><span class="hs-identifier hs-var">carry'</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035656"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_mul"><span class="hs-identifier hs-type">bignat_mul</span></a></span><span>
</span><span id="line-167"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-168"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-169"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-170"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-171"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-172"></span><span id="bignat_mul"><span class="annot"><span class="annottext">bignat_mul :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_mul"><span class="hs-identifier hs-var hs-var">bignat_mul</span></a></span></span><span> </span><span id="local-6989586621679035654"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035654"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035653"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035653"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035652"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035652"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035651"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035651"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-173"></span><span>   </span><span class="hs-comment">-- initialize the resulting WordArray</span><span>
</span><span id="line-174"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaFill%23"><span class="hs-identifier hs-var">mwaFill#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035654"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035649"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035651"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-175"></span><span>      </span><span id="local-6989586621679035648"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035648"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035647"><span class="hs-identifier hs-var">mulEachB</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035646"><span class="hs-identifier hs-var">ctzB</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035648"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-comment">-- loop on b Words</span><span>
</span><span id="line-176"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-177"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035645"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035645"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035653"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-178"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035644"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679035644"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035652"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-179"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035649"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035649"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035645"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035644"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035643"><span class="annot"><span class="annottext">ctzA :: Int#
</span><a href="#local-6989586621679035643"><span class="hs-identifier hs-var hs-var">ctzA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatCtzWord%23"><span class="hs-identifier hs-var">bigNatCtzWord#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035653"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035646"><span class="annot"><span class="annottext">ctzB :: Int#
</span><a href="#local-6989586621679035646"><span class="hs-identifier hs-var hs-var">ctzB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatCtzWord%23"><span class="hs-identifier hs-var">bigNatCtzWord#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035652"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span>      </span><span class="hs-comment">-- multiply a single bj Word# to the whole wa WordArray</span><span>
</span><span id="line-185"></span><span>      </span><span id="local-6989586621679035641"><span class="annot"><span class="annottext">mul :: Word#
-&gt; Int# -&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035641"><span class="hs-identifier hs-var hs-var">mul</span></a></span></span><span> </span><span id="local-6989586621679035640"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035640"><span class="hs-identifier hs-var">bj</span></a></span></span><span> </span><span id="local-6989586621679035639"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035639"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span id="local-6989586621679035638"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035638"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035637"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035637"><span class="hs-identifier hs-var">carry</span></a></span></span><span> </span><span id="local-6989586621679035636"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035636"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-186"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035638"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035645"><span class="hs-identifier hs-var">szA</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>         </span><span class="hs-comment">-- write the carry</span><span>
</span><span id="line-188"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaAddInplaceWord%23"><span class="hs-identifier hs-var">mwaAddInplaceWord#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035654"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035638"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035639"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035637"><span class="hs-identifier hs-var">carry</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035636"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-191"></span><span>                     </span><span id="local-6989586621679035634"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035634"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035653"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035638"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-192"></span><span>                     </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035633"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035633"><span class="hs-identifier hs-var">c'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679035632"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035632"><span class="hs-identifier hs-var">r'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord2%23"><span class="hs-identifier hs-var">timesWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035634"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035640"><span class="hs-identifier hs-var">bj</span></a></span><span>
</span><span id="line-193"></span><span>                     </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035631"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035631"><span class="hs-identifier hs-var">c''</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679035630"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035630"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord2%23"><span class="hs-identifier hs-var">plusWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035632"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035637"><span class="hs-identifier hs-var">carry</span></a></span><span>
</span><span id="line-194"></span><span>                     </span><span id="local-6989586621679035629"><span class="annot"><span class="annottext">carry' :: Word#
</span><a href="#local-6989586621679035629"><span class="hs-identifier hs-var hs-var">carry'</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-identifier hs-var">plusWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035633"><span class="hs-identifier hs-var">c'</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035631"><span class="hs-identifier hs-var">c''</span></a></span><span>
</span><span id="line-195"></span><span>                  </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaAddInplaceWord%23"><span class="hs-identifier hs-var">mwaAddInplaceWord#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035654"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035638"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035639"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035630"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035636"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-196"></span><span>                        </span><span id="local-6989586621679035628"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035628"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
-&gt; Int# -&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035641"><span class="hs-identifier hs-var">mul</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035640"><span class="hs-identifier hs-var">bj</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035639"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035638"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035629"><span class="hs-identifier hs-var">carry'</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035628"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span>      </span><span class="hs-comment">-- for each bj in wb, call `mul bj wa`</span><span>
</span><span id="line-199"></span><span>      </span><span id="local-6989586621679035647"><span class="annot"><span class="annottext">mulEachB :: Int# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035647"><span class="hs-identifier hs-var hs-var">mulEachB</span></a></span></span><span> </span><span id="local-6989586621679035627"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035627"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035626"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035626"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-200"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035627"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035644"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035626"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-201"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035652"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035627"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-202"></span><span>            </span><span class="hs-comment">-- detect bj == 0## and skip the loop</span><span>
</span><span id="line-203"></span><span>            </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035647"><span class="hs-identifier hs-var">mulEachB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035627"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035626"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-204"></span><span>            </span><span id="local-6989586621679035625"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035625"><span class="hs-identifier hs-var">bi</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word#
-&gt; Int# -&gt; Int# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035641"><span class="hs-identifier hs-var">mul</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035625"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035627"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035643"><span class="hs-identifier hs-var">ctzA</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035626"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-205"></span><span>                     </span><span id="local-6989586621679035624"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035624"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679035647"><span class="hs-identifier hs-var">mulEachB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035627"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035624"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_sub"><span class="hs-identifier hs-type">bignat_sub</span></a></span><span>
</span><span id="line-208"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-209"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-210"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-211"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-212"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-213"></span><span id="bignat_sub"><span class="annot"><span class="annottext">bignat_sub :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Backend.Native.html#bignat_sub"><span class="hs-identifier hs-var hs-var">bignat_sub</span></a></span></span><span> </span><span id="local-6989586621679035622"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035622"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035621"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035621"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035620"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035620"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035619"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035619"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-214"></span><span>   </span><span class="hs-comment">-- initialize the resulting WordArray</span><span>
</span><span id="line-215"></span><span>   </span><span class="hs-comment">-- Note: we could avoid the copy by subtracting the first non-zero</span><span>
</span><span id="line-216"></span><span>   </span><span class="hs-comment">-- less-significant word of b...</span><span>
</span><span id="line-217"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035622"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035621"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035621"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035619"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-218"></span><span>      </span><span id="local-6989586621679035618"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035618"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Int# #)
forall d.
MutableWordArray# d
-&gt; Int# -&gt; WordArray# -&gt; State# d -&gt; (# State# d, Int# #)
</span><a href="GHC.Num.WordArray.html#mwaSubInplaceArray"><span class="hs-identifier hs-var">mwaSubInplaceArray</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035622"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035620"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035618"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_popcount"><span class="hs-identifier hs-type">bignat_popcount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-221"></span><span id="bignat_popcount"><span class="annot"><span class="annottext">bignat_popcount :: WordArray# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_popcount"><span class="hs-identifier hs-var hs-var">bignat_popcount</span></a></span></span><span> </span><span id="local-6989586621679035615"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035615"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679035614"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-222"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-223"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035613"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035613"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035615"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-224"></span><span>      </span><span id="local-6989586621679035614"><span class="annot"><span class="annottext">go :: Int# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679035614"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035612"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035612"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035611"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035611"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-225"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035612"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035613"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035611"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-226"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679035614"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035612"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035611"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#popCnt%23"><span class="hs-identifier hs-var">popCnt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035615"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035612"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span id="local-6989586621679035610"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_shiftl"><span class="hs-identifier hs-type">bignat_shiftl</span></a></span><span>
</span><span id="line-229"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035610"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-230"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-231"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-232"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035610"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-233"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035610"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-234"></span><span id="bignat_shiftl"><span class="annot"><span class="annottext">bignat_shiftl :: forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_shiftl"><span class="hs-identifier hs-var hs-var">bignat_shiftl</span></a></span></span><span> </span><span id="local-6989586621679035608"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035608"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035607"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035607"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035606"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035606"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679035605"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035605"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-235"></span><span>   </span><span class="hs-comment">-- set the lower words to 0</span><span>
</span><span id="line-236"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s
-&gt; Word# -&gt; Word# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaFill%23"><span class="hs-identifier hs-var">mwaFill#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035608"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035604"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035605"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-237"></span><span>      </span><span id="local-6989586621679035603"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035603"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span>
</span><span id="line-238"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035602"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035608"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035604"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035607"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035601"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035603"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-239"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035600"><span class="hs-identifier hs-var">mwaBitShift</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035603"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-240"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-241"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035601"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035601"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035607"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-242"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035604"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035604"><span class="hs-identifier hs-var">nw</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035602"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035602"><span class="hs-identifier hs-var">nb</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Int#, Int# #)
</span><a href="GHC.Num.Backend.Native.html#count_words_bits_int"><span class="hs-identifier hs-var">count_words_bits_int</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035606"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-243"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035599"><span class="annot"><span class="annottext">sh :: Int#
</span><a href="#local-6989586621679035599"><span class="hs-identifier hs-var hs-var">sh</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span> </span><span class="hs-operator">-#</span><span> </span><span class="hs-identifier">nb</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span>      </span><span class="hs-comment">-- Bit granularity (c is the carry from the previous shift)</span><span>
</span><span id="line-246"></span><span>      </span><span id="local-6989586621679035600"><span class="annot"><span class="annottext">mwaBitShift :: Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035600"><span class="hs-identifier hs-var hs-var">mwaBitShift</span></a></span></span><span> </span><span id="local-6989586621679035598"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035598"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035597"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035597"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679035596"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035596"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-247"></span><span>         </span><span class="hs-comment">-- write the carry</span><span>
</span><span id="line-248"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035598"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035601"><span class="hs-identifier hs-var">szA</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-249"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Word# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteOrShrink"><span class="hs-identifier hs-var">mwaWriteOrShrink</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035608"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035597"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035598"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035604"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035596"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-252"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-253"></span><span>               </span><span class="hs-glyph">!</span><span id="local-6989586621679035595"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035595"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035607"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035598"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-254"></span><span>               </span><span class="hs-glyph">!</span><span id="local-6989586621679035594"><span class="annot"><span class="annottext">v :: Word#
</span><a href="#local-6989586621679035594"><span class="hs-identifier hs-var hs-var">v</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035597"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035595"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035602"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>               </span><span class="hs-glyph">!</span><span id="local-6989586621679035593"><span class="annot"><span class="annottext">c' :: Word#
</span><a href="#local-6989586621679035593"><span class="hs-identifier hs-var hs-var">c'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035595"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035599"><span class="hs-identifier hs-var">sh</span></a></span><span>
</span><span id="line-256"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035608"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035598"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035604"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035594"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035596"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-257"></span><span>                  </span><span id="local-6989586621679035592"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035592"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035600"><span class="hs-identifier hs-var">mwaBitShift</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035598"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035593"><span class="hs-identifier hs-var">c'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035592"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span id="local-6989586621679035591"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_shiftr"><span class="hs-identifier hs-type">bignat_shiftr</span></a></span><span>
</span><span id="line-261"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035591"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-262"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-263"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-264"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035591"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-265"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035591"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-266"></span><span id="bignat_shiftr"><span class="annot"><span class="annottext">bignat_shiftr :: forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_shiftr"><span class="hs-identifier hs-var hs-var">bignat_shiftr</span></a></span></span><span> </span><span id="local-6989586621679035589"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035589"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035588"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035588"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035587"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035587"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679035586"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035586"><span class="hs-identifier hs-var">s1</span></a></span></span><span>
</span><span id="line-267"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035585"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035589"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035588"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035584"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035583"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035586"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-268"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035582"><span class="hs-identifier hs-var">mwaBitShift</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035583"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035586"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-269"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-270"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035581"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035581"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035588"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-271"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035584"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035584"><span class="hs-identifier hs-var">nw</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035585"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035585"><span class="hs-identifier hs-var">nb</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Int#, Int# #)
</span><a href="GHC.Num.Backend.Native.html#count_words_bits_int"><span class="hs-identifier hs-var">count_words_bits_int</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035587"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-272"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035583"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035583"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035581"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035584"><span class="hs-identifier hs-var">nw</span></a></span><span>
</span><span id="line-273"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035580"><span class="annot"><span class="annottext">sh :: Int#
</span><a href="#local-6989586621679035580"><span class="hs-identifier hs-var hs-var">sh</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span> </span><span class="hs-operator">-#</span><span> </span><span class="hs-identifier">nb</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span>      </span><span class="hs-comment">-- Bit granularity (c is the carry from the previous shift)</span><span>
</span><span id="line-276"></span><span>      </span><span id="local-6989586621679035582"><span class="annot"><span class="annottext">mwaBitShift :: Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035582"><span class="hs-identifier hs-var hs-var">mwaBitShift</span></a></span></span><span> </span><span id="local-6989586621679035579"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035579"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035578"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035578"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679035577"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035577"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-277"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035579"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035577"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-278"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-279"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-280"></span><span>               </span><span class="hs-glyph">!</span><span id="local-6989586621679035576"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035576"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035588"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035579"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035584"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span>               </span><span class="hs-glyph">!</span><span id="local-6989586621679035575"><span class="annot"><span class="annottext">v :: Word#
</span><a href="#local-6989586621679035575"><span class="hs-identifier hs-var hs-var">v</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035578"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035576"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035585"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>               </span><span class="hs-glyph">!</span><span id="local-6989586621679035574"><span class="annot"><span class="annottext">c' :: Word#
</span><a href="#local-6989586621679035574"><span class="hs-identifier hs-var hs-var">c'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035576"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035580"><span class="hs-identifier hs-var">sh</span></a></span><span>
</span><span id="line-283"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035589"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035579"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035575"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035577"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-284"></span><span>                  </span><span id="local-6989586621679035573"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035573"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035582"><span class="hs-identifier hs-var">mwaBitShift</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035579"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035574"><span class="hs-identifier hs-var">c'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035573"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span id="local-6989586621679035572"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_shiftr_neg"><span class="hs-identifier hs-type">bignat_shiftr_neg</span></a></span><span>
</span><span id="line-287"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035572"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-288"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-289"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-290"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035572"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-291"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035572"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-292"></span><span id="bignat_shiftr_neg"><span class="annot"><span class="annottext">bignat_shiftr_neg :: forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_shiftr_neg"><span class="hs-identifier hs-var hs-var">bignat_shiftr_neg</span></a></span></span><span> </span><span id="local-6989586621679035570"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035570"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035569"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035569"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035568"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035568"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679035567"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035567"><span class="hs-identifier hs-var">s1</span></a></span></span><span>
</span><span id="line-293"></span><span>   </span><span class="hs-comment">-- initialize higher limb</span><span>
</span><span id="line-294"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035570"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035566"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035567"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-295"></span><span>      </span><span id="local-6989586621679035565"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035565"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_shiftr"><span class="hs-identifier hs-var">bignat_shiftr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035570"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035569"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035568"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035565"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-296"></span><span>         </span><span id="local-6989586621679035564"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035564"><span class="hs-identifier hs-var">s3</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679035563"><span class="hs-identifier hs-var">nz_shifted_out</span></a></span><span>
</span><span id="line-297"></span><span>                  </span><span class="hs-comment">-- round if non-zero bits were shifted out</span><span>
</span><span id="line-298"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaAddInplaceWord%23"><span class="hs-identifier hs-var">mwaAddInplaceWord#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035570"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035564"><span class="hs-identifier hs-var">s3</span></a></span><span>
</span><span id="line-299"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035564"><span class="hs-identifier hs-var">s3</span></a></span><span>
</span><span id="line-300"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-301"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035566"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035566"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035569"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-302"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035562"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035562"><span class="hs-identifier hs-var">nw</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035561"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035561"><span class="hs-identifier hs-var">nb</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Int#, Int# #)
</span><a href="GHC.Num.Backend.Native.html#count_words_bits_int"><span class="hs-identifier hs-var">count_words_bits_int</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035568"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span>      </span><span class="hs-comment">-- non-zero bits are shifted out?</span><span>
</span><span id="line-305"></span><span>      </span><span id="local-6989586621679035563"><span class="annot"><span class="annottext">nz_shifted_out :: Bool
</span><a href="#local-6989586621679035563"><span class="hs-identifier hs-var hs-var">nz_shifted_out</span></a></span></span><span>
</span><span id="line-306"></span><span>         </span><span class="hs-comment">-- test nb bits</span><span>
</span><span id="line-307"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-308"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035561"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span>            </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-var">&amp;&amp;#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035569"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035562"><span class="hs-identifier hs-var">nw</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>
</span><span id="line-310"></span><span>                  </span><span class="hs-special">(</span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span> </span><span class="hs-operator">-#</span><span> </span><span class="hs-identifier">nb</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">neWord#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0##</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-311"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-312"></span><span>         </span><span class="hs-comment">-- test nw words</span><span>
</span><span id="line-313"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-314"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-315"></span><span>            </span><span id="local-6989586621679035560"><span class="annot"><span class="annottext">go :: Int# -&gt; Bool
</span><a href="#local-6989586621679035560"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035559"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035559"><span class="hs-identifier hs-var">j</span></a></span></span><span>
</span><span id="line-316"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035559"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035562"><span class="hs-identifier hs-var">nw</span></a></span><span class="hs-special">)</span><span>                           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-317"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035569"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035559"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#neWord%23"><span class="hs-operator hs-var">`neWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-318"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="#local-6989586621679035560"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035559"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>           </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="#local-6989586621679035560"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span>
</span><span id="line-322"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_or"><span class="hs-identifier hs-type">bignat_or</span></a></span><span>
</span><span id="line-323"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-324"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-325"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-326"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-327"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-328"></span><span id="bignat_or"><span class="annot"><span class="annottext">bignat_or :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_or"><span class="hs-identifier hs-var hs-var">bignat_or</span></a></span></span><span> </span><span id="local-6989586621679035557"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035557"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035556"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035556"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035555"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035555"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035554"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035554"><span class="hs-identifier hs-var">s1</span></a></span></span><span>
</span><span id="line-329"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035553"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035552"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679035551"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035556"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035553"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035555"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035552"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035554"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-330"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679035551"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035555"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035552"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035556"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035553"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035554"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-331"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-332"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035553"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035553"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035556"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-333"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035552"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679035552"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035555"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-334"></span><span>      </span><span class="hs-comment">-- nx &gt;= ny</span><span>
</span><span id="line-335"></span><span>      </span><span id="local-6989586621679035551"><span class="annot"><span class="annottext">go :: WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679035551"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035550"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035550"><span class="hs-identifier hs-var">wx</span></a></span></span><span> </span><span id="local-6989586621679035549"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035549"><span class="hs-identifier hs-var">nx</span></a></span></span><span> </span><span id="local-6989586621679035548"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035548"><span class="hs-identifier hs-var">wy</span></a></span></span><span> </span><span id="local-6989586621679035547"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035547"><span class="hs-identifier hs-var">ny</span></a></span></span><span> </span><span id="local-6989586621679035546"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035546"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-336"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitArrayBinOp"><span class="hs-identifier hs-var">mwaInitArrayBinOp</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035557"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035550"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035548"><span class="hs-identifier hs-var">wy</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-identifier hs-var">or#</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035546"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-337"></span><span>            </span><span id="local-6989586621679035544"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035544"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035557"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035547"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035550"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035547"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035549"><span class="hs-identifier hs-var">nx</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035547"><span class="hs-identifier hs-var">ny</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035544"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-338"></span><span>
</span><span id="line-339"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_xor"><span class="hs-identifier hs-type">bignat_xor</span></a></span><span>
</span><span id="line-340"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-341"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-342"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-343"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-344"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-345"></span><span id="bignat_xor"><span class="annot"><span class="annottext">bignat_xor :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_xor"><span class="hs-identifier hs-var hs-var">bignat_xor</span></a></span></span><span> </span><span id="local-6989586621679035542"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035542"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035541"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035541"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035540"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035540"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035539"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035539"><span class="hs-identifier hs-var">s1</span></a></span></span><span>
</span><span id="line-346"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035538"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035537"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679035536"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035541"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035538"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035540"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035537"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035539"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-347"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679035536"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035540"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035537"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035541"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035538"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035539"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-348"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-349"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035538"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035538"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035541"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-350"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035537"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679035537"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035540"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-351"></span><span>      </span><span class="hs-comment">-- nx &gt;= ny</span><span>
</span><span id="line-352"></span><span>      </span><span id="local-6989586621679035536"><span class="annot"><span class="annottext">go :: WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679035536"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035535"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035535"><span class="hs-identifier hs-var">wx</span></a></span></span><span> </span><span id="local-6989586621679035534"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035534"><span class="hs-identifier hs-var">nx</span></a></span></span><span> </span><span id="local-6989586621679035533"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035533"><span class="hs-identifier hs-var">wy</span></a></span></span><span> </span><span id="local-6989586621679035532"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035532"><span class="hs-identifier hs-var">ny</span></a></span></span><span> </span><span id="local-6989586621679035531"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035531"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-353"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitArrayBinOp"><span class="hs-identifier hs-var">mwaInitArrayBinOp</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035542"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035535"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035533"><span class="hs-identifier hs-var">wy</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xor%23"><span class="hs-identifier hs-var">xor#</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035531"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-354"></span><span>            </span><span id="local-6989586621679035530"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035530"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035542"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035532"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035535"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035532"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035534"><span class="hs-identifier hs-var">nx</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035532"><span class="hs-identifier hs-var">ny</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035530"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_and"><span class="hs-identifier hs-type">bignat_and</span></a></span><span>
</span><span id="line-357"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-358"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-359"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-360"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-361"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-362"></span><span id="bignat_and"><span class="annot"><span class="annottext">bignat_and :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_and"><span class="hs-identifier hs-var hs-var">bignat_and</span></a></span></span><span> </span><span id="local-6989586621679035528"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035528"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035527"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035527"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035526"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035526"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035525"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035525"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitArrayBinOp"><span class="hs-identifier hs-var">mwaInitArrayBinOp</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035528"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035527"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035526"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-identifier hs-var">and#</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035525"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_and_not"><span class="hs-identifier hs-type">bignat_and_not</span></a></span><span>
</span><span id="line-365"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-366"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-367"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-368"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-369"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-370"></span><span id="bignat_and_not"><span class="annot"><span class="annottext">bignat_and_not :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_and_not"><span class="hs-identifier hs-var hs-var">bignat_and_not</span></a></span></span><span> </span><span id="local-6989586621679035523"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035523"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035522"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035522"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035521"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035521"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035520"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035520"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-371"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; (Word# -&gt; Word# -&gt; Word#)
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitArrayBinOp"><span class="hs-identifier hs-var">mwaInitArrayBinOp</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035523"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035522"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035521"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679035519"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035519"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679035518"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035518"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035519"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#not%23"><span class="hs-identifier hs-var">not#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035518"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035520"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-372"></span><span>      </span><span id="local-6989586621679035517"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035517"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035523"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035516"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035522"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035516"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035515"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035516"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035517"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-373"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-374"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035515"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035515"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035522"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-375"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035516"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679035516"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035521"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span id="local-6989586621679035753"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_quotrem"><span class="hs-identifier hs-type">bignat_quotrem</span></a></span><span>
</span><span id="line-378"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035753"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-379"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035753"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-380"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-381"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-382"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035753"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-383"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035753"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-384"></span><span id="bignat_quotrem"><span class="annot"><span class="annottext">bignat_quotrem :: forall s.
MutableWordArray# s
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_quotrem"><span class="hs-identifier hs-var hs-var">bignat_quotrem</span></a></span></span><span> </span><span id="local-6989586621679035513"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035513"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679035512"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035512"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679035511"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035511"><span class="hs-identifier hs-var">uwa</span></a></span></span><span> </span><span id="local-6989586621679035510"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035510"><span class="hs-identifier hs-var">uwb</span></a></span></span><span> </span><span id="local-6989586621679035509"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035509"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-385"></span><span>   </span><span class="hs-comment">-- Normalization consists in left-shifting bits in B and A so that the</span><span>
</span><span id="line-386"></span><span>   </span><span class="hs-comment">-- most-significant bit of the most-significant word of B is 1. It makes</span><span>
</span><span id="line-387"></span><span>   </span><span class="hs-comment">-- quotient prediction much more efficient as we only use the two most</span><span>
</span><span id="line-388"></span><span>   </span><span class="hs-comment">-- significant words of A and the most significant word of B to make the</span><span>
</span><span id="line-389"></span><span>   </span><span class="hs-comment">-- prediction.</span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span>   </span><span class="hs-comment">-- we will left-shift A and B of &quot;clzb&quot; bits for normalization</span><span>
</span><span id="line-392"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035508"><span class="annot"><span class="annottext">clzb :: Word#
</span><a href="#local-6989586621679035508"><span class="hs-identifier hs-var hs-var">clzb</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#clz%23"><span class="hs-identifier hs-var">clz#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035510"><span class="hs-identifier hs-var">uwb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035510"><span class="hs-identifier hs-var">uwb</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span>   </span><span class="hs-comment">-- we use a single array initially containing A (normalized) and</span><span>
</span><span id="line-395"></span><span>   </span><span class="hs-comment">-- returning the remainder (normalized): mnwa (for &quot;mutable normalized</span><span>
</span><span id="line-396"></span><span>   </span><span class="hs-comment">-- wordarray A&quot;)</span><span>
</span><span id="line-397"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-398"></span><span>   </span><span class="hs-comment">-- We allocate it here with an additionnal Word compared to A because</span><span>
</span><span id="line-399"></span><span>   </span><span class="hs-comment">-- normalizing can left shift at most (N-1) bits (on N-bit arch).</span><span>
</span><span id="line-400"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035511"><span class="hs-identifier hs-var">uwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035509"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035506"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035506"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035505"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-401"></span><span>
</span><span id="line-402"></span><span>   </span><span class="hs-comment">-- normalized A in mnwa</span><span>
</span><span id="line-403"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679035504"><span class="annot"><span class="annottext">normalizeA :: State# s -&gt; State# s
</span><a href="#local-6989586621679035504"><span class="hs-identifier hs-var hs-var">normalizeA</span></a></span></span><span> </span><span id="local-6989586621679035503"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035503"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035511"><span class="hs-identifier hs-var">uwa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035503"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-comment">-- init potential carry</span><span>
</span><span id="line-404"></span><span>                         </span><span id="local-6989586621679035502"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035502"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_shiftl"><span class="hs-identifier hs-var">bignat_shiftl</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035511"><span class="hs-identifier hs-var">uwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035508"><span class="hs-identifier hs-var">clzb</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035502"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>     </span><span class="hs-comment">-- left shift</span><span>
</span><span id="line-405"></span><span>                            </span><span id="local-6989586621679035501"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035501"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035501"><span class="hs-identifier hs-var">s</span></a></span><span>                  </span><span class="hs-comment">-- remove null carry if any</span><span>
</span><span id="line-406"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; State# s
</span><a href="#local-6989586621679035504"><span class="hs-identifier hs-var">normalizeA</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035506"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679035499"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035499"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-407"></span><span>
</span><span id="line-408"></span><span>   </span><span class="hs-comment">-- normalize B. We don't do it in a MutableWordArray because it will remain</span><span>
</span><span id="line-409"></span><span>   </span><span class="hs-comment">-- constant during the whole computation.</span><span>
</span><span id="line-410"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035498"><span class="annot"><span class="annottext">nwb :: WordArray#
</span><a href="#local-6989586621679035498"><span class="hs-identifier hs-var hs-var">nwb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Word# -&gt; WordArray#
</span><a href="GHC.Num.BigNat.html#bigNatShiftL%23"><span class="hs-identifier hs-var">bigNatShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035510"><span class="hs-identifier hs-var">uwb</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035508"><span class="hs-identifier hs-var">clzb</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-411"></span><span>
</span><span id="line-412"></span><span>   </span><span class="hs-comment">-- perform quotrem on normalized inputs</span><span>
</span><span id="line-413"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
-&gt; MutableWordArray# s -&gt; WordArray# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s
-&gt; MutableWordArray# s -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_quotrem_normalized"><span class="hs-identifier hs-var">bignat_quotrem_normalized</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035513"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035498"><span class="hs-identifier hs-var">nwb</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035499"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679035495"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035495"><span class="hs-identifier hs-var">s3</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span>   </span><span class="hs-comment">-- denormalize the remainder now stored in mnwa. We just have to right shift</span><span>
</span><span id="line-416"></span><span>   </span><span class="hs-comment">-- of &quot;clzb&quot; bits. We copy the result into &quot;mwr&quot; array.</span><span>
</span><span id="line-417"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679035494"><span class="annot"><span class="annottext">denormalizeR :: State# s -&gt; State# s
</span><a href="#local-6989586621679035494"><span class="hs-identifier hs-var hs-var">denormalizeR</span></a></span></span><span> </span><span id="local-6989586621679035493"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035493"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035493"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-418"></span><span>                         </span><span id="local-6989586621679035492"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035492"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, WordArray# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, WordArray# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035505"><span class="hs-identifier hs-var">mnwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035492"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-419"></span><span>                            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035491"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035491"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035490"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035490"><span class="hs-identifier hs-var">wr</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035512"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035490"><span class="hs-identifier hs-var">wr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035491"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-420"></span><span>                               </span><span id="local-6989586621679035488"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035488"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_shiftr"><span class="hs-identifier hs-var">bignat_shiftr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035512"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035490"><span class="hs-identifier hs-var">wr</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035508"><span class="hs-identifier hs-var">clzb</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035488"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-421"></span><span>                                 </span><span id="local-6989586621679035487"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035487"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaTrimZeroes%23"><span class="hs-identifier hs-var">mwaTrimZeroes#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035512"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035487"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-422"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; State# s
</span><a href="#local-6989586621679035494"><span class="hs-identifier hs-var">denormalizeR</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035495"><span class="hs-identifier hs-var">s3</span></a></span><span>
</span><span id="line-423"></span><span>   </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-424"></span><span>
</span><span id="line-425"></span><span>
</span><span id="line-426"></span><span>
</span><span id="line-427"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_quot"><span class="hs-identifier hs-type">bignat_quot</span></a></span><span>
</span><span id="line-428"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-429"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-430"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-431"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-432"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-433"></span><span id="bignat_quot"><span class="annot"><span class="annottext">bignat_quot :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_quot"><span class="hs-identifier hs-var hs-var">bignat_quot</span></a></span></span><span> </span><span id="local-6989586621679035485"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035485"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679035484"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035484"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035483"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035483"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035482"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035482"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-434"></span><span>   </span><span class="hs-comment">-- allocate a temporary array for the remainder and call quotrem</span><span>
</span><span id="line-435"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035483"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035482"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-436"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035481"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035481"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035480"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035480"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_quotrem"><span class="hs-identifier hs-var">bignat_quotrem</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035485"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035480"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035484"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035483"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035481"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-437"></span><span>
</span><span id="line-438"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_rem"><span class="hs-identifier hs-type">bignat_rem</span></a></span><span>
</span><span id="line-439"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-440"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-441"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-442"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-443"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-444"></span><span id="bignat_rem"><span class="annot"><span class="annottext">bignat_rem :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_rem"><span class="hs-identifier hs-var hs-var">bignat_rem</span></a></span></span><span> </span><span id="local-6989586621679035478"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035478"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679035477"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035477"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035476"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035476"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679035475"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035475"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-445"></span><span>   </span><span class="hs-comment">-- allocate a temporary array for the quotient and call quotrem</span><span>
</span><span id="line-446"></span><span>   </span><span class="hs-comment">-- (we could avoid allocating it as it is not used to compute the result but</span><span>
</span><span id="line-447"></span><span>   </span><span class="hs-comment">-- it would require non trivial modification of bignat_quotrem)</span><span>
</span><span id="line-448"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035474"><span class="hs-identifier hs-var">szQ</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035475"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-449"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035473"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035473"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035472"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035472"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableWordArray# s
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# s
-&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_quotrem"><span class="hs-identifier hs-var">bignat_quotrem</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035472"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035478"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035477"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035476"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035473"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-450"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-451"></span><span>   </span><span id="local-6989586621679035471"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679035471"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035477"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-452"></span><span>   </span><span id="local-6989586621679035470"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679035470"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035476"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-453"></span><span>   </span><span id="local-6989586621679035474"><span class="annot"><span class="annottext">szQ :: Int#
</span><a href="#local-6989586621679035474"><span class="hs-identifier hs-var hs-var">szQ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035471"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035470"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-454"></span><span>
</span><span id="line-455"></span><span class="hs-comment">-- | Perform quotRem on normalized inputs:</span><span>
</span><span id="line-456"></span><span class="hs-comment">--    * highest bit of B is set</span><span>
</span><span id="line-457"></span><span class="hs-comment">--    * A is trimmed</span><span>
</span><span id="line-458"></span><span class="hs-comment">--    * A &gt;= B</span><span>
</span><span id="line-459"></span><span class="hs-comment">--    * B &gt; 1</span><span>
</span><span id="line-460"></span><span id="local-6989586621679035749"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_quotrem_normalized"><span class="hs-identifier hs-type">bignat_quotrem_normalized</span></a></span><span>
</span><span id="line-461"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035749"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-462"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035749"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-463"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-464"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035749"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-465"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035749"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-466"></span><span id="bignat_quotrem_normalized"><span class="annot"><span class="annottext">bignat_quotrem_normalized :: forall s.
MutableWordArray# s
-&gt; MutableWordArray# s -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_quotrem_normalized"><span class="hs-identifier hs-var hs-var">bignat_quotrem_normalized</span></a></span></span><span> </span><span id="local-6989586621679035469"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035469"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679035468"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679035467"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035466"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035466"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-467"></span><span>
</span><span id="line-468"></span><span>   </span><span class="hs-comment">-- n is the size of B</span><span>
</span><span id="line-469"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035465"><span class="annot"><span class="annottext">n :: Int#
</span><a href="#local-6989586621679035465"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span>   </span><span class="hs-comment">-- m+n is the size of A (m &gt;= 0)</span><span>
</span><span id="line-472"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, Int# #)
forall s. MutableWordArray# s -&gt; State# s -&gt; (# State# s, Int# #)
</span><a href="GHC.Num.WordArray.html#mwaSize%23"><span class="hs-identifier hs-var">mwaSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035466"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035463"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035463"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035462"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035462"><span class="hs-identifier hs-var">szA</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-473"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035461"><span class="annot"><span class="annottext">m :: Int#
</span><a href="#local-6989586621679035461"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035462"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035465"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-474"></span><span>
</span><span id="line-475"></span><span>   </span><span class="hs-comment">-- Definitions:</span><span>
</span><span id="line-476"></span><span>   </span><span class="hs-comment">--    MSW(x) is the most-significant word of x</span><span>
</span><span id="line-477"></span><span>   </span><span class="hs-comment">--    MSB(x) the most-significant bit of x</span><span>
</span><span id="line-478"></span><span>
</span><span id="line-479"></span><span>   </span><span class="hs-comment">-- We first compute MSW(Q).  Thanks to the normalization of B, MSW(Q) can</span><span>
</span><span id="line-480"></span><span>   </span><span class="hs-comment">-- only be 0 or 1 so we only have to perform a prefix comparison to compute</span><span>
</span><span id="line-481"></span><span>   </span><span class="hs-comment">-- MSW(Q).</span><span>
</span><span id="line-482"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-483"></span><span>   </span><span class="hs-comment">--    Proof MSW(Q) &lt; 2:</span><span>
</span><span id="line-484"></span><span>   </span><span class="hs-comment">--       * MSB(MSW(B)) = 1 thanks to normalization.</span><span>
</span><span id="line-485"></span><span>   </span><span class="hs-comment">--       * MSW(B) * MSW(Q) &lt;= MSW(A) by definition</span><span>
</span><span id="line-486"></span><span>   </span><span class="hs-comment">--       * suppose MSW(Q) &gt;= 2:</span><span>
</span><span id="line-487"></span><span>   </span><span class="hs-comment">--          MSW(B) * MSW(Q) &gt;= MSW(B) &lt;&lt; 1    { MSW(Q) &gt;= 2              }</span><span>
</span><span id="line-488"></span><span>   </span><span class="hs-comment">--                          &gt;  MAX_WORD_VALUE { MSB(MSW(B)) = 1          }</span><span>
</span><span id="line-489"></span><span>   </span><span class="hs-comment">--                          &gt;  MSW(A)         { MSW(A) &lt;= MAX_WORD_VALUE }</span><span>
</span><span id="line-490"></span><span>   </span><span class="hs-comment">--          contradiction.</span><span>
</span><span id="line-491"></span><span>   </span><span class="hs-comment">--</span><span>
</span><span id="line-492"></span><span>   </span><span class="hs-comment">-- If A &gt;= (B &lt;&lt; m words)</span><span>
</span><span id="line-493"></span><span>   </span><span class="hs-comment">--    then Qm = 1</span><span>
</span><span id="line-494"></span><span>   </span><span class="hs-comment">--         A := A - (B &lt;&lt; m words)</span><span>
</span><span id="line-495"></span><span>   </span><span class="hs-comment">--    else Qm = 0</span><span>
</span><span id="line-496"></span><span>   </span><span class="hs-comment">--         A unchanged</span><span>
</span><span id="line-497"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679035460"><span class="annot"><span class="annottext">computeQm :: State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035460"><span class="hs-identifier hs-var hs-var">computeQm</span></a></span></span><span> </span><span id="local-6989586621679035459"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035459"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Ordering #)
forall s.
Int#
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Ordering #)
</span><a href="GHC.Num.WordArray.html#mwaTrimCompare"><span class="hs-identifier hs-var">mwaTrimCompare</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035461"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035459"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-498"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035457"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035457"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035457"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-499"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035456"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035456"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035456"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span>       </span><span id="local-6989586621679035455"><span class="annot"><span class="annottext">updateQj :: Int# -&gt; Word# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035455"><span class="hs-identifier hs-var hs-var">updateQj</span></a></span></span><span> </span><span id="local-6989586621679035454"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035454"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span id="local-6989586621679035453"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035453"><span class="hs-identifier hs-var">qj</span></a></span></span><span> </span><span id="local-6989586621679035452"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035452"><span class="hs-identifier hs-var">qjb</span></a></span></span><span> </span><span id="local-6989586621679035451"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035451"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035469"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035454"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035453"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035451"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-comment">-- write Qj</span><span>
</span><span id="line-502"></span><span>               </span><span id="local-6989586621679035450"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035450"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035453"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035450"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-503"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
-&gt; Int# -&gt; WordArray# -&gt; State# s -&gt; (# State# s, Int# #)
forall d.
MutableWordArray# d
-&gt; Int# -&gt; WordArray# -&gt; State# d -&gt; (# State# d, Int# #)
</span><a href="GHC.Num.WordArray.html#mwaSubInplaceArray"><span class="hs-identifier hs-var">mwaSubInplaceArray</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035454"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035452"><span class="hs-identifier hs-var">qjb</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035450"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-comment">-- subtract (qjB &lt;&lt; j words)</span><span>
</span><span id="line-504"></span><span>                                 </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035449"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035449"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035449"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-505"></span><span>
</span><span id="line-506"></span><span>       </span><span class="hs-comment">-- update the highest word of Q</span><span>
</span><span id="line-507"></span><span>       </span><span id="local-6989586621679035448"><span class="annot"><span class="annottext">updateQm :: State# s -&gt; State# s
</span><a href="#local-6989586621679035448"><span class="hs-identifier hs-var hs-var">updateQm</span></a></span></span><span> </span><span id="local-6989586621679035447"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035447"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035460"><span class="hs-identifier hs-var">computeQm</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035447"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-508"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035446"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035446"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035445"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035445"><span class="hs-identifier hs-var">qm</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035455"><span class="hs-identifier hs-var">updateQj</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035461"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035445"><span class="hs-identifier hs-var">qm</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035446"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span>       </span><span class="hs-comment">-- the size of Q is szA+szB+1 BEFORE normalization. Normalization may add</span><span>
</span><span id="line-511"></span><span>       </span><span class="hs-comment">-- an additional higher word to A.</span><span>
</span><span id="line-512"></span><span>       </span><span class="hs-comment">--   * If A has an additional limb:</span><span>
</span><span id="line-513"></span><span>       </span><span class="hs-comment">--      * MSW(A) &lt; MSW(B). Because MSB(MSW(A)) can't be set (it would</span><span>
</span><span id="line-514"></span><span>       </span><span class="hs-comment">--        mean that we shifted a whole word, which we didn't)</span><span>
</span><span id="line-515"></span><span>       </span><span class="hs-comment">--      * hence MSW(Q) = 0 but we don't have to write it (and we mustn't)</span><span>
</span><span id="line-516"></span><span>       </span><span class="hs-comment">--        because of the size of Q</span><span>
</span><span id="line-517"></span><span>       </span><span class="hs-comment">--   * If A has no additional limb:</span><span>
</span><span id="line-518"></span><span>       </span><span class="hs-comment">--      * We have to check if MSW(A) &gt;= MSW(B) and to adjust A and MSW(Q)</span><span>
</span><span id="line-519"></span><span>       </span><span class="hs-comment">--        accordingly</span><span>
</span><span id="line-520"></span><span>       </span><span class="hs-comment">--</span><span>
</span><span id="line-521"></span><span>       </span><span class="hs-comment">-- We detect if A has an additional limb by comparing the size of Q with m</span><span>
</span><span id="line-522"></span><span>       </span><span id="local-6989586621679035444"><span class="annot"><span class="annottext">updateQmMaybe :: State# s -&gt; State# s
</span><a href="#local-6989586621679035444"><span class="hs-identifier hs-var hs-var">updateQmMaybe</span></a></span></span><span> </span><span id="local-6989586621679035443"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035443"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; State# s -&gt; (# State# s, Int# #)
forall s. MutableWordArray# s -&gt; State# s -&gt; (# State# s, Int# #)
</span><a href="GHC.Num.WordArray.html#mwaSize%23"><span class="hs-identifier hs-var">mwaSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035469"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035443"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-523"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035442"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035442"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035441"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035441"><span class="hs-identifier hs-var">szQ</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035461"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035441"><span class="hs-identifier hs-var">szQ</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; State# s
</span><a href="#local-6989586621679035448"><span class="hs-identifier hs-var">updateQm</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035442"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-524"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035442"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# s -&gt; State# s
</span><a href="#local-6989586621679035444"><span class="hs-identifier hs-var">updateQmMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035463"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679035440"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035440"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-527"></span><span>
</span><span id="line-528"></span><span>
</span><span id="line-529"></span><span>   </span><span class="hs-comment">-- main loop: for j from (m-1) downto 0</span><span>
</span><span id="line-530"></span><span>   </span><span class="hs-comment">--    We estimate a one Word quotient qj:</span><span>
</span><span id="line-531"></span><span>   </span><span class="hs-comment">--       e1e0 &lt;- a(n+j)a(n+j-1) `div` b(n-1)</span><span>
</span><span id="line-532"></span><span>   </span><span class="hs-comment">--       qj | e1 == 0   = e0</span><span>
</span><span id="line-533"></span><span>   </span><span class="hs-comment">--          | otherwise = maxBound</span><span>
</span><span id="line-534"></span><span>   </span><span class="hs-comment">--    We loop until we find the real quotient:</span><span>
</span><span id="line-535"></span><span>   </span><span class="hs-comment">--       while (A &lt; ((qj*B) &lt;&lt; j words)) qj--</span><span>
</span><span id="line-536"></span><span>   </span><span class="hs-comment">--    We update A and Qj:</span><span>
</span><span id="line-537"></span><span>   </span><span class="hs-comment">--       Qj := qj</span><span>
</span><span id="line-538"></span><span>   </span><span class="hs-comment">--       A  := A - (qj*B &lt;&lt; j words)</span><span>
</span><span id="line-539"></span><span>
</span><span id="line-540"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679035439"><span class="annot"><span class="annottext">bmsw :: Word#
</span><a href="#local-6989586621679035439"><span class="hs-identifier hs-var hs-var">bmsw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Word#
</span><a href="GHC.Num.WordArray.html#wordArrayLast%23"><span class="hs-identifier hs-var">wordArrayLast#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-comment">-- most significant word of B</span><span>
</span><span id="line-541"></span><span>
</span><span id="line-542"></span><span>       </span><span id="local-6989586621679035437"><span class="annot"><span class="annottext">estimateQj :: Int# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035437"><span class="hs-identifier hs-var hs-var">estimateQj</span></a></span></span><span> </span><span id="local-6989586621679035436"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035436"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span id="local-6989586621679035435"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035435"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-543"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; State# s -&gt; (# State# s, Word# #)
forall s.
MutableWordArray# s -&gt; Int# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.WordArray.html#mwaRead%23"><span class="hs-identifier hs-var">mwaRead#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035465"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035436"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035435"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-544"></span><span>           </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035433"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035433"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035432"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035432"><span class="hs-identifier hs-var">a1</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; State# s -&gt; (# State# s, Word# #)
forall s.
MutableWordArray# s -&gt; Int# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.WordArray.html#mwaRead%23"><span class="hs-identifier hs-var">mwaRead#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035465"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035436"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035433"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-545"></span><span>             </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035431"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035431"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035430"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035430"><span class="hs-identifier hs-var">a0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(# Word#, Word# #) -&gt; Word# -&gt; (# (# Word#, Word# #), Word# #)
</span><a href="GHC.Num.Primitives.html#quotRemWord3%23"><span class="hs-identifier hs-var">quotRemWord3#</span></a></span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035432"><span class="hs-identifier hs-var">a1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035430"><span class="hs-identifier hs-var">a0</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035439"><span class="hs-identifier hs-var">bmsw</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-546"></span><span>               </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035428"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035428"><span class="hs-identifier hs-var">qj</span></a></span></span><span> </span><span class="hs-special">#)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035431"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span>              </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035428"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-547"></span><span>               </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span>   </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035431"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-identifier">WORD_MAXBOUND##</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-548"></span><span>
</span><span id="line-549"></span><span>       </span><span class="hs-comment">-- we perform the qj*B multiplication once and then we subtract B from</span><span>
</span><span id="line-550"></span><span>       </span><span class="hs-comment">-- qj*B as much as needed until (qj'*B &lt;&lt; j words) &lt;= A</span><span>
</span><span id="line-551"></span><span>       </span><span id="local-6989586621679035427"><span class="annot"><span class="annottext">findRealQj :: Int# -&gt; Word# -&gt; State# s -&gt; (# State# s, Word#, WordArray# #)
</span><a href="#local-6989586621679035427"><span class="hs-identifier hs-var hs-var">findRealQj</span></a></span></span><span> </span><span id="local-6989586621679035426"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035426"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span id="local-6989586621679035425"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035425"><span class="hs-identifier hs-var">qj</span></a></span></span><span> </span><span id="local-6989586621679035424"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035424"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; Word#
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Word#, WordArray# #)
</span><a href="#local-6989586621679035423"><span class="hs-identifier hs-var">findRealQj'</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035426"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035425"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Word# -&gt; WordArray#
</span><a href="GHC.Num.BigNat.html#bigNatMulWord%23"><span class="hs-identifier hs-var">bigNatMulWord#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035425"><span class="hs-identifier hs-var">qj</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035424"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span>       </span><span id="local-6989586621679035423"><span class="annot"><span class="annottext">findRealQj' :: Int#
-&gt; Word#
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Word#, WordArray# #)
</span><a href="#local-6989586621679035423"><span class="hs-identifier hs-var hs-var">findRealQj'</span></a></span></span><span> </span><span id="local-6989586621679035421"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035421"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span id="local-6989586621679035420"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035420"><span class="hs-identifier hs-var">qj</span></a></span></span><span> </span><span id="local-6989586621679035419"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035419"><span class="hs-identifier hs-var">qjB</span></a></span></span><span> </span><span id="local-6989586621679035418"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035418"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Ordering #)
forall s.
Int#
-&gt; MutableWordArray# s
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Ordering #)
</span><a href="GHC.Num.WordArray.html#mwaTrimCompare"><span class="hs-identifier hs-var">mwaTrimCompare</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035421"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035468"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035419"><span class="hs-identifier hs-var">qjB</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035418"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-554"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035417"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035417"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; Word#
-&gt; WordArray#
-&gt; State# s
-&gt; (# State# s, Word#, WordArray# #)
</span><a href="#local-6989586621679035423"><span class="hs-identifier hs-var">findRealQj'</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035421"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035420"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; WordArray# -&gt; WordArray#
</span><a href="GHC.Num.BigNat.html#bigNatSubUnsafe"><span class="hs-identifier hs-var">bigNatSubUnsafe</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035419"><span class="hs-identifier hs-var">qjB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035467"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035417"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-555"></span><span>                                                            </span><span class="hs-comment">-- TODO: we could do the sub inplace to</span><span>
</span><span id="line-556"></span><span>                                                            </span><span class="hs-comment">-- reduce allocations</span><span>
</span><span id="line-557"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035415"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035415"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035415"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035420"><span class="hs-identifier hs-var">qj</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035419"><span class="hs-identifier hs-var">qjB</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span>       </span><span id="local-6989586621679035414"><span class="annot"><span class="annottext">loop :: Int# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035414"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span id="local-6989586621679035413"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035413"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span id="local-6989586621679035412"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035412"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035437"><span class="hs-identifier hs-var">estimateQj</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035413"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035412"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-560"></span><span>         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035411"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035411"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035410"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035410"><span class="hs-identifier hs-var">qj</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; (# State# s, Word#, WordArray# #)
</span><a href="#local-6989586621679035427"><span class="hs-identifier hs-var">findRealQj</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035413"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035410"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035411"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-561"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035409"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035409"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035408"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035408"><span class="hs-identifier hs-var">qj</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035407"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035407"><span class="hs-identifier hs-var">qjB</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035455"><span class="hs-identifier hs-var">updateQj</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035413"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035408"><span class="hs-identifier hs-var">qj</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035407"><span class="hs-identifier hs-var">qjB</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035409"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-562"></span><span>               </span><span id="local-6989586621679035406"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035406"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035413"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035406"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-563"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035414"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035413"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035406"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span>
</span><span id="line-566"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035461"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035440"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-567"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035414"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035461"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035440"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-568"></span><span>   </span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span id="local-6989586621679035743"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_quotrem_word"><span class="hs-identifier hs-type">bignat_quotrem_word</span></a></span><span>
</span><span id="line-571"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035743"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-comment">-- ^ Quotient</span><span>
</span><span id="line-572"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-573"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-574"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035743"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-575"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035743"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-576"></span><span id="bignat_quotrem_word"><span class="annot"><span class="annottext">bignat_quotrem_word :: forall s.
MutableWordArray# s
-&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Backend.Native.html#bignat_quotrem_word"><span class="hs-identifier hs-var hs-var">bignat_quotrem_word</span></a></span></span><span> </span><span id="local-6989586621679035404"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035404"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679035403"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035403"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035402"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035402"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035401"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035401"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035400"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035399"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035401"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-577"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-578"></span><span>      </span><span id="local-6989586621679035399"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035399"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035403"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-579"></span><span>      </span><span id="local-6989586621679035400"><span class="annot"><span class="annottext">go :: Int# -&gt; Word# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035400"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035398"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035398"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035397"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035397"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679035396"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035396"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-580"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035398"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035396"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035397"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-581"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-582"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-583"></span><span>               </span><span id="local-6989586621679035395"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035395"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035403"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035398"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-584"></span><span>               </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035394"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035394"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679035393"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035393"><span class="hs-identifier hs-var">r'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord2%23"><span class="hs-identifier hs-var">quotRemWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035397"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035395"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035402"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-585"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035404"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035398"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035394"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035396"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-586"></span><span>                  </span><span id="local-6989586621679035392"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035392"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679035400"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035398"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035393"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035392"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-587"></span><span>
</span><span id="line-588"></span><span id="local-6989586621679035391"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_quot_word"><span class="hs-identifier hs-type">bignat_quot_word</span></a></span><span>
</span><span id="line-589"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035391"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-comment">-- ^ Quotient</span><span>
</span><span id="line-590"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-591"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-592"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035391"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-593"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035391"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-594"></span><span id="bignat_quot_word"><span class="annot"><span class="annottext">bignat_quot_word :: forall s.
MutableWordArray# s -&gt; WordArray# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_quot_word"><span class="hs-identifier hs-var hs-var">bignat_quot_word</span></a></span></span><span> </span><span id="local-6989586621679035389"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035389"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679035388"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035388"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035387"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035387"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035386"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035386"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035385"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035384"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035386"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-595"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-596"></span><span>      </span><span id="local-6989586621679035384"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035384"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035388"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-597"></span><span>      </span><span id="local-6989586621679035385"><span class="annot"><span class="annottext">go :: Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035385"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035383"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035383"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035382"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035382"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679035381"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035381"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-598"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035383"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035381"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-599"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-600"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-601"></span><span>               </span><span id="local-6989586621679035380"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035380"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035388"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035383"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-602"></span><span>               </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035379"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035379"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679035378"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035378"><span class="hs-identifier hs-var">r'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord2%23"><span class="hs-identifier hs-var">quotRemWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035382"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035380"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035387"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-603"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
forall s.
MutableWordArray# s -&gt; Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWrite%23"><span class="hs-identifier hs-var">mwaWrite#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035389"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035383"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035379"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035381"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-604"></span><span>                  </span><span id="local-6989586621679035377"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035377"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035385"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035383"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035378"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035377"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-605"></span><span>
</span><span id="line-606"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_rem_word"><span class="hs-identifier hs-type">bignat_rem_word</span></a></span><span>
</span><span id="line-607"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-608"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-609"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-610"></span><span id="bignat_rem_word"><span class="annot"><span class="annottext">bignat_rem_word :: WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_rem_word"><span class="hs-identifier hs-var hs-var">bignat_rem_word</span></a></span></span><span> </span><span id="local-6989586621679035375"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035375"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035374"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035374"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679035373"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035372"><span class="hs-identifier hs-var">sz</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-611"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-612"></span><span>      </span><span id="local-6989586621679035372"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035372"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035375"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-613"></span><span>      </span><span id="local-6989586621679035373"><span class="annot"><span class="annottext">go :: Int# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679035373"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035371"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035371"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679035370"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035370"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-614"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035371"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035370"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-615"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-616"></span><span>            </span><span class="hs-keyword">let</span><span>
</span><span id="line-617"></span><span>               </span><span id="local-6989586621679035369"><span class="annot"><span class="annottext">ai :: Word#
</span><a href="#local-6989586621679035369"><span class="hs-identifier hs-var hs-var">ai</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035375"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035371"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-618"></span><span>               </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679035368"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035368"><span class="hs-identifier hs-var">r'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord2%23"><span class="hs-identifier hs-var">quotRemWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035370"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035369"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035374"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-619"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word# -&gt; Word#
</span><a href="#local-6989586621679035373"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035371"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035368"><span class="hs-identifier hs-var">r'</span></a></span><span>
</span><span id="line-620"></span><span>
</span><span id="line-621"></span><span>
</span><span id="line-622"></span><span id="local-6989586621679035367"><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_gcd"><span class="hs-identifier hs-type">bignat_gcd</span></a></span><span>
</span><span id="line-623"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035367"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-624"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-625"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-626"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035367"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-627"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679035367"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-628"></span><span id="bignat_gcd"><span class="annot"><span class="annottext">bignat_gcd :: forall s.
MutableWordArray# s
-&gt; WordArray# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Backend.Native.html#bignat_gcd"><span class="hs-identifier hs-var hs-var">bignat_gcd</span></a></span></span><span> </span><span id="local-6989586621679035365"><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035365"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035364"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-629"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-630"></span><span>      </span><span id="local-6989586621679035364"><span class="annot"><span class="annottext">go :: WordArray# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035364"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035363"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035363"><span class="hs-identifier hs-var">wmax</span></a></span></span><span> </span><span id="local-6989586621679035362"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035362"><span class="hs-identifier hs-var">wmin</span></a></span></span><span> </span><span id="local-6989586621679035361"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035361"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-631"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035362"><span class="hs-identifier hs-var">wmin</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-632"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s -&gt; WordArray# -&gt; State# s -&gt; State# s
forall s. MutableByteArray# s -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitCopyShrink%23"><span class="hs-identifier hs-var">mwaInitCopyShrink#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# s
</span><a href="#local-6989586621679035365"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035363"><span class="hs-identifier hs-var">wmax</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035361"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-633"></span><span>
</span><span id="line-634"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-635"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-636"></span><span>             </span><span id="local-6989586621679035359"><span class="annot"><span class="annottext">wmax' :: WordArray#
</span><a href="#local-6989586621679035359"><span class="hs-identifier hs-var hs-var">wmax'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035362"><span class="hs-identifier hs-var">wmin</span></a></span><span>
</span><span id="line-637"></span><span>             </span><span class="hs-glyph">!</span><span id="local-6989586621679035358"><span class="annot"><span class="annottext">wmin' :: WordArray#
</span><a href="#local-6989586621679035358"><span class="hs-identifier hs-var hs-var">wmin'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; WordArray# -&gt; WordArray#
</span><a href="GHC.Num.BigNat.html#bigNatRem"><span class="hs-identifier hs-var">bigNatRem</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035363"><span class="hs-identifier hs-var">wmax</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035362"><span class="hs-identifier hs-var">wmin</span></a></span><span>
</span><span id="line-638"></span><span>           </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="#local-6989586621679035364"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035359"><span class="hs-identifier hs-var">wmax'</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035358"><span class="hs-identifier hs-var">wmin'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679035361"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-639"></span><span>
</span><span id="line-640"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_gcd_word"><span class="hs-identifier hs-type">bignat_gcd_word</span></a></span><span>
</span><span id="line-641"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-642"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-643"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-644"></span><span id="bignat_gcd_word"><span class="annot"><span class="annottext">bignat_gcd_word :: WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_gcd_word"><span class="hs-identifier hs-var hs-var">bignat_gcd_word</span></a></span></span><span> </span><span id="local-6989586621679035355"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035355"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679035354"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035354"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_gcd_word_word"><span class="hs-identifier hs-var">bignat_gcd_word_word</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035354"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.BigNat.html#bigNatRemWord%23"><span class="hs-identifier hs-var">bigNatRemWord#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035355"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035354"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-645"></span><span>
</span><span id="line-646"></span><span class="hs-comment">-- | This operation doesn't really belongs here, but GMP's one is much faster</span><span>
</span><span id="line-647"></span><span class="hs-comment">-- than this simple implementation (basic Euclid algorithm).</span><span>
</span><span id="line-648"></span><span class="hs-comment">--</span><span>
</span><span id="line-649"></span><span class="hs-comment">-- Ideally we should make an implementation as fast as GMP's one and put it into</span><span>
</span><span id="line-650"></span><span class="hs-comment">-- GHC.Num.Primitives.</span><span>
</span><span id="line-651"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_gcd_word_word"><span class="hs-identifier hs-type">bignat_gcd_word_word</span></a></span><span>
</span><span id="line-652"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-653"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-654"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-655"></span><span id="bignat_gcd_word_word"><span class="annot"><span class="annottext">bignat_gcd_word_word :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_gcd_word_word"><span class="hs-identifier hs-var hs-var">bignat_gcd_word_word</span></a></span></span><span> </span><span id="local-6989586621679035351"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035351"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035351"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-656"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_gcd_word_word"><span class="hs-identifier hs-var">bignat_gcd_word_word</span></a></span><span> </span><span id="local-6989586621679035350"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035350"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679035349"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035349"><span class="hs-identifier hs-var">b</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_gcd_word_word"><span class="hs-identifier hs-var">bignat_gcd_word_word</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035349"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035350"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#remWord%23"><span class="hs-operator hs-var">`remWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035349"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_encode_double"><span class="hs-identifier hs-type">bignat_encode_double</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span>
</span><span id="line-659"></span><span id="bignat_encode_double"><span class="annot"><span class="annottext">bignat_encode_double :: WordArray# -&gt; Int# -&gt; Double#
</span><a href="GHC.Num.Backend.Native.html#bignat_encode_double"><span class="hs-identifier hs-var hs-var">bignat_encode_double</span></a></span></span><span> </span><span id="local-6989586621679035347"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035347"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679035346"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035346"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Int# -&gt; Int# -&gt; Double#
</span><a href="#local-6989586621679035345"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><span class="hs-number">0.0##</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035346"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-660"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-661"></span><span>      </span><span id="local-6989586621679035344"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679035344"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035347"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-662"></span><span>      </span><span id="local-6989586621679035345"><span class="annot"><span class="annottext">go :: Double# -&gt; Int# -&gt; Int# -&gt; Double#
</span><a href="#local-6989586621679035345"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679035343"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679035343"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span id="local-6989586621679035342"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035342"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679035341"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035341"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-663"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035341"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035344"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679035343"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-664"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-665"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Int# -&gt; Int# -&gt; Double#
</span><a href="#local-6989586621679035345"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679035343"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23%23"><span class="hs-operator hs-var">+##</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Double#
</span><a href="GHC.Num.Primitives.html#wordEncodeDouble%23"><span class="hs-identifier hs-var">wordEncodeDouble#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWordArray%23"><span class="hs-identifier hs-var">indexWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035347"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035341"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035342"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-666"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035342"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- FIXME: we assume that e doesn't overflow...</span><span>
</span><span id="line-667"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679035341"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-668"></span><span>
</span><span id="line-669"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_powmod_word"><span class="hs-identifier hs-type">bignat_powmod_word</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-670"></span><span id="bignat_powmod_word"><span class="annot"><span class="annottext">bignat_powmod_word :: WordArray# -&gt; WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_powmod_word"><span class="hs-identifier hs-var hs-var">bignat_powmod_word</span></a></span></span><span> </span><span id="local-6989586621679035338"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035338"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span id="local-6989586621679035337"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035337"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span id="local-6989586621679035336"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035336"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural -&gt; Word#
</span><a href="#local-6989586621679035335"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035338"><span class="hs-identifier hs-var">b0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035337"><span class="hs-identifier hs-var">e0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromWord%23"><span class="hs-identifier hs-var">naturalFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-671"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-672"></span><span>      </span><span id="local-6989586621679035335"><span class="annot"><span class="annottext">go :: Natural -&gt; Natural -&gt; Natural -&gt; Word#
</span><a href="#local-6989586621679035335"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035332"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035332"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035331"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035331"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035330"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035330"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-673"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035331"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word# -&gt; Int#
</span><a href="GHC.Num.Natural.html#naturalTestBit%23"><span class="hs-operator hs-var">`naturalTestBit#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span>
</span><span id="line-674"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural -&gt; Word#
</span><a href="#local-6989586621679035335"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035329"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035328"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035330"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalMul"><span class="hs-operator hs-var">`naturalMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035332"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalRem"><span class="hs-operator hs-var">`naturalRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035327"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-675"></span><span>
</span><span id="line-676"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Bool
</span><a href="GHC.Num.Natural.html#naturalIsZero"><span class="hs-identifier hs-var">naturalIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035331"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-677"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word#
</span><a href="GHC.Num.Natural.html#naturalToWord%23"><span class="hs-identifier hs-var">naturalToWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035330"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-678"></span><span>
</span><span id="line-679"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-680"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural -&gt; Word#
</span><a href="#local-6989586621679035335"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035329"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035328"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035330"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-681"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-682"></span><span>          </span><span id="local-6989586621679035329"><span class="annot"><span class="annottext">b' :: Natural
</span><a href="#local-6989586621679035329"><span class="hs-identifier hs-var hs-var">b'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035332"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalMul"><span class="hs-operator hs-var">`naturalMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035332"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalRem"><span class="hs-operator hs-var">`naturalRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035327"><span class="hs-identifier hs-var">m'</span></a></span><span>
</span><span id="line-683"></span><span>          </span><span id="local-6989586621679035327"><span class="annot"><span class="annottext">m' :: Natural
</span><a href="#local-6989586621679035327"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromWord%23"><span class="hs-identifier hs-var">naturalFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035336"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-684"></span><span>          </span><span id="local-6989586621679035328"><span class="annot"><span class="annottext">e' :: Natural
</span><a href="#local-6989586621679035328"><span class="hs-identifier hs-var hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035331"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalShiftR%23"><span class="hs-operator hs-var">`naturalShiftR#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-comment">-- slightly faster than &quot;e `div` 2&quot;</span><span>
</span><span id="line-685"></span><span>
</span><span id="line-686"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_powmod"><span class="hs-identifier hs-type">bignat_powmod</span></a></span><span>
</span><span id="line-687"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-688"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-689"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-690"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-691"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-692"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-693"></span><span id="bignat_powmod"><span class="annot"><span class="annottext">bignat_powmod :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.Native.html#bignat_powmod"><span class="hs-identifier hs-var hs-var">bignat_powmod</span></a></span></span><span> </span><span id="local-6989586621679035324"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035324"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679035323"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035323"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span id="local-6989586621679035322"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035322"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span id="local-6989586621679035321"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035321"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679035320"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035320"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; WordArray# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaInitCopyShrink%23"><span class="hs-identifier hs-var">mwaInitCopyShrink#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679035324"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035319"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679035320"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-694"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-695"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035319"><span class="annot"><span class="annottext">r' :: WordArray#
</span><a href="#local-6989586621679035319"><span class="hs-identifier hs-var hs-var">r'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural -&gt; WordArray#
</span><a href="#local-6989586621679035318"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035323"><span class="hs-identifier hs-var">b0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-696"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035322"><span class="hs-identifier hs-var">e0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-697"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromWord%23"><span class="hs-identifier hs-var">naturalFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-698"></span><span>
</span><span id="line-699"></span><span>      </span><span id="local-6989586621679035318"><span class="annot"><span class="annottext">go :: Natural -&gt; Natural -&gt; Natural -&gt; WordArray#
</span><a href="#local-6989586621679035318"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035317"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035317"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035316"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035316"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035315"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035315"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-700"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035316"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word# -&gt; Int#
</span><a href="GHC.Num.Natural.html#naturalTestBit%23"><span class="hs-operator hs-var">`naturalTestBit#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span>
</span><span id="line-701"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural -&gt; WordArray#
</span><a href="#local-6989586621679035318"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035314"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035313"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035315"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalMul"><span class="hs-operator hs-var">`naturalMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035317"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalRem"><span class="hs-operator hs-var">`naturalRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035312"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-702"></span><span>
</span><span id="line-703"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Bool
</span><a href="GHC.Num.Natural.html#naturalIsZero"><span class="hs-identifier hs-var">naturalIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035316"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-704"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; WordArray#
</span><a href="GHC.Num.Natural.html#naturalToBigNat%23"><span class="hs-identifier hs-var">naturalToBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035315"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-705"></span><span>
</span><span id="line-706"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-707"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural -&gt; WordArray#
</span><a href="#local-6989586621679035318"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035314"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035313"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035315"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-708"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-709"></span><span>          </span><span id="local-6989586621679035314"><span class="annot"><span class="annottext">b' :: Natural
</span><a href="#local-6989586621679035314"><span class="hs-identifier hs-var hs-var">b'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035317"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalMul"><span class="hs-operator hs-var">`naturalMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035317"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalRem"><span class="hs-operator hs-var">`naturalRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035312"><span class="hs-identifier hs-var">m'</span></a></span><span>
</span><span id="line-710"></span><span>          </span><span id="local-6989586621679035312"><span class="annot"><span class="annottext">m' :: Natural
</span><a href="#local-6989586621679035312"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679035321"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-711"></span><span>          </span><span id="local-6989586621679035313"><span class="annot"><span class="annottext">e' :: Natural
</span><a href="#local-6989586621679035313"><span class="hs-identifier hs-var hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035316"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalShiftR%23"><span class="hs-operator hs-var">`naturalShiftR#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-comment">-- slightly faster than &quot;e `div` 2&quot;</span><span>
</span><span id="line-712"></span><span>
</span><span id="line-713"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#bignat_powmod_words"><span class="hs-identifier hs-type">bignat_powmod_words</span></a></span><span>
</span><span id="line-714"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-715"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-716"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-717"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-718"></span><span id="bignat_powmod_words"><span class="annot"><span class="annottext">bignat_powmod_words :: Word# -&gt; Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_powmod_words"><span class="hs-identifier hs-var hs-var">bignat_powmod_words</span></a></span></span><span> </span><span id="local-6989586621679035309"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035309"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035308"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035308"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679035307"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035307"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-719"></span><span>   </span><span class="annot"><span class="annottext">WordArray# -&gt; WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.Native.html#bignat_powmod_word"><span class="hs-identifier hs-var">bignat_powmod_word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; WordArray#
</span><a href="GHC.Num.WordArray.html#wordArrayFromWord%23"><span class="hs-identifier hs-var">wordArrayFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035309"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-720"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; WordArray#
</span><a href="GHC.Num.WordArray.html#wordArrayFromWord%23"><span class="hs-identifier hs-var">wordArrayFromWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035308"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-721"></span><span>                      </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679035307"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-722"></span><span>
</span><span id="line-723"></span><span>
</span><span id="line-724"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#integer_gcde"><span class="hs-identifier hs-type">integer_gcde</span></a></span><span>
</span><span id="line-725"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-726"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-727"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-728"></span><span id="integer_gcde"><span class="annot"><span class="annottext">integer_gcde :: Integer -&gt; Integer -&gt; (# Integer, Integer, Integer #)
</span><a href="GHC.Num.Backend.Native.html#integer_gcde"><span class="hs-identifier hs-var hs-var">integer_gcde</span></a></span></span><span> </span><span id="local-6989586621679035304"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035304"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679035303"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035303"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(# Integer, Integer, Integer #)
-&gt; (# Integer, Integer, Integer #)
-&gt; (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035302"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035304"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Num.Integer.html#integerOne"><span class="hs-identifier hs-var">integerOne</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Num.Integer.html#integerZero"><span class="hs-identifier hs-var">integerZero</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035303"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Num.Integer.html#integerZero"><span class="hs-identifier hs-var">integerZero</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Num.Integer.html#integerOne"><span class="hs-identifier hs-var">integerOne</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-729"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-730"></span><span>    </span><span class="hs-comment">-- returned &quot;g&quot; must be positive</span><span>
</span><span id="line-731"></span><span>    </span><span id="local-6989586621679035299"><span class="annot"><span class="annottext">fix :: (# Integer, Integer, Integer #) -&gt; (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035299"><span class="hs-identifier hs-var hs-var">fix</span></a></span></span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035298"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035298"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035297"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035297"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035296"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035296"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-732"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Bool
</span><a href="GHC.Num.Integer.html#integerIsNegative"><span class="hs-identifier hs-var">integerIsNegative</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035298"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerNegate"><span class="hs-identifier hs-var">integerNegate</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035298"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerNegate"><span class="hs-identifier hs-var">integerNegate</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035297"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerNegate"><span class="hs-identifier hs-var">integerNegate</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035296"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-733"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035298"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035297"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035296"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-734"></span><span>
</span><span id="line-735"></span><span>    </span><span id="local-6989586621679035302"><span class="annot"><span class="annottext">f :: (# Integer, Integer, Integer #)
-&gt; (# Integer, Integer, Integer #)
-&gt; (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035302"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679035294"><span class="annot"><span class="annottext">old :: (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035294"><span class="hs-identifier hs-var">old</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035293"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035293"><span class="hs-identifier hs-var">old_g</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035292"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035292"><span class="hs-identifier hs-var">old_s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035291"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035291"><span class="hs-identifier hs-var">old_t</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span id="local-6989586621679035290"><span class="annot"><span class="annottext">new :: (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035290"><span class="hs-identifier hs-var">new</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035289"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035289"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035288"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035288"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035287"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035287"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-736"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Bool
</span><a href="GHC.Num.Integer.html#integerIsZero"><span class="hs-identifier hs-var">integerIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035289"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(# Integer, Integer, Integer #) -&gt; (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035299"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="annot"><span class="annottext">(# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035294"><span class="hs-identifier hs-var">old</span></a></span><span>
</span><span id="line-737"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; (# Integer, Integer #)
</span><a href="GHC.Num.Integer.html#integerQuotRem%23"><span class="hs-identifier hs-var">integerQuotRem#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035293"><span class="hs-identifier hs-var">old_g</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035289"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-738"></span><span>                              </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035285"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035285"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035284"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035284"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(# Integer, Integer, Integer #)
-&gt; (# Integer, Integer, Integer #)
-&gt; (# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035302"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(# Integer, Integer, Integer #)
</span><a href="#local-6989586621679035290"><span class="hs-identifier hs-var">new</span></a></span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035284"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035292"><span class="hs-identifier hs-var">old_s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerSub"><span class="hs-operator hs-var">`integerSub`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035285"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerMul"><span class="hs-operator hs-var">`integerMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035288"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-739"></span><span>                                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035291"><span class="hs-identifier hs-var">old_t</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerSub"><span class="hs-operator hs-var">`integerSub`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035285"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerMul"><span class="hs-operator hs-var">`integerMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035287"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-740"></span><span>
</span><span id="line-741"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#integer_recip_mod"><span class="hs-identifier hs-type">integer_recip_mod</span></a></span><span>
</span><span id="line-742"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-743"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-744"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-745"></span><span id="integer_recip_mod"><span class="annot"><span class="annottext">integer_recip_mod :: Integer -&gt; Natural -&gt; (# Natural | () #)
</span><a href="GHC.Num.Backend.Native.html#integer_recip_mod"><span class="hs-identifier hs-var hs-var">integer_recip_mod</span></a></span></span><span> </span><span id="local-6989586621679035282"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035282"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679035281"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035281"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-746"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679035280"><span class="annot"><span class="annottext">m' :: Integer
</span><a href="#local-6989586621679035280"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerFromNatural"><span class="hs-identifier hs-var">integerFromNatural</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035281"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-747"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; (# Integer, Integer, Integer #)
</span><a href="GHC.Num.Backend.Native.html#integer_gcde"><span class="hs-identifier hs-var">integer_gcde</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035282"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035280"><span class="hs-identifier hs-var">m'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-748"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679035279"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035279"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035278"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035278"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679035277"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035277"><span class="hs-identifier hs-var">_b</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-749"></span><span>         </span><span class="hs-comment">-- gcd(x,m) = ax+mb = 1</span><span>
</span><span id="line-750"></span><span>         </span><span class="hs-comment">-- ==&gt; ax - 1 = -mb</span><span>
</span><span id="line-751"></span><span>         </span><span class="hs-comment">-- ==&gt; ax     = 1 [m]</span><span>
</span><span id="line-752"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035279"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
</span><a href="GHC.Num.Integer.html#integerEq"><span class="hs-operator hs-var">`integerEq`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Num.Integer.html#integerOne"><span class="hs-identifier hs-var">integerOne</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Natural
</span><a href="GHC.Num.Integer.html#integerToNatural"><span class="hs-identifier hs-var">integerToNatural</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035278"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerMod"><span class="hs-operator hs-var">`integerMod`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035280"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-753"></span><span>                                       </span><span class="hs-comment">-- a `mod` m &gt; 0 because m &gt; 0</span><span>
</span><span id="line-754"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-755"></span><span>
</span><span id="line-756"></span><span class="annot"><a href="GHC.Num.Backend.Native.html#integer_powmod"><span class="hs-identifier hs-type">integer_powmod</span></a></span><span>
</span><span id="line-757"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-758"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-759"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-760"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-761"></span><span id="integer_powmod"><span class="annot"><span class="annottext">integer_powmod :: Integer -&gt; Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Backend.Native.html#integer_powmod"><span class="hs-identifier hs-var hs-var">integer_powmod</span></a></span></span><span> </span><span id="local-6989586621679035274"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035274"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span id="local-6989586621679035273"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035273"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span id="local-6989586621679035272"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035272"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Natural -&gt; Integer -&gt; Natural
</span><a href="#local-6989586621679035271"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035274"><span class="hs-identifier hs-var">b0</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035273"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Num.Integer.html#integerOne"><span class="hs-identifier hs-var">integerOne</span></a></span><span>
</span><span id="line-762"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-763"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679035270"><span class="annot"><span class="annottext">m' :: Integer
</span><a href="#local-6989586621679035270"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerFromNatural"><span class="hs-identifier hs-var">integerFromNatural</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035272"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-764"></span><span>
</span><span id="line-765"></span><span>      </span><span id="local-6989586621679035271"><span class="annot"><span class="annottext">go :: Integer -&gt; Natural -&gt; Integer -&gt; Natural
</span><a href="#local-6989586621679035271"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035269"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035269"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679035268"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035268"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679035267"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035267"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-766"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035268"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word# -&gt; Int#
</span><a href="GHC.Num.Natural.html#naturalTestBit%23"><span class="hs-operator hs-var">`naturalTestBit#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span>
</span><span id="line-767"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Natural -&gt; Integer -&gt; Natural
</span><a href="#local-6989586621679035271"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035266"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035265"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035267"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerMul"><span class="hs-operator hs-var">`integerMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035269"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerMod"><span class="hs-operator hs-var">`integerMod`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035270"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-768"></span><span>
</span><span id="line-769"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Bool
</span><a href="GHC.Num.Natural.html#naturalIsZero"><span class="hs-identifier hs-var">naturalIsZero</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035268"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-770"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Natural
</span><a href="GHC.Num.Integer.html#integerToNatural"><span class="hs-identifier hs-var">integerToNatural</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035267"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-comment">-- r &gt;= 0 by integerMod above</span><span>
</span><span id="line-771"></span><span>
</span><span id="line-772"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-773"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Natural -&gt; Integer -&gt; Natural
</span><a href="#local-6989586621679035271"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035266"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035265"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035267"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-774"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-775"></span><span>          </span><span id="local-6989586621679035266"><span class="annot"><span class="annottext">b' :: Integer
</span><a href="#local-6989586621679035266"><span class="hs-identifier hs-var hs-var">b'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035269"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerMul"><span class="hs-operator hs-var">`integerMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035269"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerRem"><span class="hs-operator hs-var">`integerRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679035270"><span class="hs-identifier hs-var">m'</span></a></span><span>
</span><span id="line-776"></span><span>          </span><span id="local-6989586621679035265"><span class="annot"><span class="annottext">e' :: Natural
</span><a href="#local-6989586621679035265"><span class="hs-identifier hs-var hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679035268"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Natural -&gt; Word# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalShiftR%23"><span class="hs-operator hs-var">`naturalShiftR#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span>
</span><span id="line-777"></span></pre></body></html>